/**
 * This class is to make the GPS point to be an object.
 * */

public class GPSpnt {
	String source_id;
	double lat, lng, speed, heading;
	String rectimeStr;
	GPSpnt prevPnt;
	SourceGPS source;
	Integer linkID = 0;
	double lamda = 0;
	String dayName = "";
	/**
	 * probe_gps row_id
	 */
	int row_id;

	public GPSpnt(SourceGPS source, int row_id, String source_id, double lat,
			double lng, double speed, double heading, String rectime) {
		this.source = source;
		this.row_id = row_id;
		this.source_id = source_id;
		this.lat = lat;
		this.lng = lng;
		this.speed = speed;
		this.heading = heading;
		this.rectimeStr = rectime;
	}

	public GPSpnt(SourceGPS sourceGPS, int row_id, String source_id,
			int linkID, double lamda, String time_stamp, String dayName) {
		this.source = sourceGPS;
		this.row_id = row_id;
		this.source_id = source_id;
		this.linkID = linkID;
		this.lamda = lamda;
		this.rectimeStr = time_stamp;
		this.dayName = dayName;
	}

	public String toString() {
		return String
				.format("GPSpnt: row_id=%d, source_id=%s, lat=%f, lng=%f, speed=%f, heading=%f, rectime=%s",
						row_id, source_id, lat, lng, speed, heading, rectimeStr);
	}

	public String toString2() {
		return String.format(
				"GPSpnt: row_id=%d, linkID=%d, lamda=%f, rectime=%s", row_id,
				linkID, lamda, rectimeStr);
	}
}
